<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.DateFormat"%>
<%@page import="com.ereport.entity.Opportunity"%>
<%@page import="java.util.List"%>
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-1.6.min.js"></script>
<link rel="stylesheet" href="<%=application.getContextPath()%>/css/datatable.css"/>
<script type="text/javascript" language="javascript" src="<%=application.getContextPath()%>/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#rfqTable').dataTable();
	} );
</script>
<style>
<!--
.dataTables_filter{
height: 45px;
width:150px;
}
.dataTables_filter input{
width:150px;
 height:20px;
  background:#e8e8e8;
   border-radius: 4px;
     border:1px solid #a1a1a1;
}
-->
</style>
<%
List<Opportunity> oplist=(List<Opportunity>)request.getAttribute("oplist");
if(oplist!=null){
%>


          <table width="98%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="100%">
                    <div id="demo">
                    <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#787878" class="tablebox" id="rfqTable">
                        <thead>
                        <tr style="background:url('<%=application.getContextPath() %>/images/hed-bg-block-2.jpg'); background-repeat:repeat-x; background-position:left top">
                          <th width="23" height="30" align="center" valign="middle" class="hed">Sr. No </th>
                          <th width="144" align="center" valign="middle" class="hed">Company</th>
                          <th width="91" align="center" valign="middle" class="hed">Division</th>
                          <th width="91" align="center" valign="middle" class="hed">Contact Person</th>
                          <th width="56" align="center" valign="middle" class="hed">Enquiry Type</th>
                          <th width="52" align="center" valign="middle" class="hed">Due Date</th>
                          <th width="110" align="center" valign="middle" class="hed">Project</th>
                          <th width="110" align="center" valign="middle" class="hed">Created Date</th>
                         
                      </tr>
                      </thead>
                      <tbody>
                        <%
                       
                  for(int i=0;i<oplist.size();i++){
                	  String ddate="";
                     Date dat=oplist.get(i).getDueDate();
                      DateFormat dfmt=new SimpleDateFormat("dd-MM-yyyy");
                      	ddate=dfmt.format(dat.getTime());
                      	
                	  String cdate="";
                     Date cdat=oplist.get(i).getCurrDate();
                      DateFormat cdfmt=new SimpleDateFormat("dd-MM-yyyy");
                      	cdate=cdfmt.format(cdat.getTime());
                      
                  %>
                        <tr>
                          <td align="center" bgcolor="#cccccc"><%=i+1%></td>
                          <td bgcolor="#cccccc" align="center" title="<%=oplist.get(i).getOrgName()%>">
                          <a href="<%=application.getContextPath() %>/opportunity/enqReport.do?dactid=<%=oplist.get(i).getDactid().getId()%>&edate=<%=cdat%>&exe=<%=oplist.get(i).getExeId().getId() %>" target="_blank" >
                          	<span style="color: #0b395c;"><%=oplist.get(i).getOrgName()%></span>
                          </a>
                         <%--  <input type="hidden" name="dactid" value="<%=oplist.get(i).getDactid()%>"/> --%>
                          </td>
                          <td bgcolor="#cccccc" align="center" title="<%= oplist.get(i).getDivision()%>">
                         	<%= oplist.get(i).getDivision()%>
                         	
                          </td>
                          <td bgcolor="#cccccc" align="center" title="<%= oplist.get(i).getContactName()%>">
                         	<%= oplist.get(i).getContactName()%>
                         	
                          </td>
                          <td bgcolor="#cccccc" align="center" title="<%=oplist.get(i).getEnqType()%>">
                          <%= oplist.get(i).getEnqType()%> 
                          </td>
                          <td  align="center" bgcolor="#cccccc" title="<%=ddate%>">
                          <%= ddate%>
                          </td>
                          <td  bgcolor="#cccccc" align="center" title="<%= oplist.get(i).getProjName()%>">
                          <%= oplist.get(i).getProjName()%>
                          </td>
                          <td  bgcolor="#cccccc" align="center" title="<%=cdate%>">
                           <%= cdate%>
                          </td>
            
                        </tr>
                        <%
                  			}
                        %>
                 </tbody>
                    </table>
                    </div>
                    </td>
                  </tr>
                 
              </table></td>
            </tr>
            <tr>
           		<td align="left" >&nbsp;</td>
           			
           	</tr>
             
           	<tr>
           		<td align="left" >&nbsp;</td>
           			
           	</tr>	  
                  
          </table>
        
   <%
	}
    %>